# Mitigating Laser Source Noise and Detection Noise in Auto-correlative Weak-Value Amplification
**Author**: Jing-Hui Huang ([jinghuihuang@cug.edu.cn]
**Repository**: [Insert GitHub/GitLab Link Here]

---

## Description  
This repository contains MATLAB and Simulink simulation code for analyzing laser source noise and detection noise in auto-correlative Weak-Value Amplification (WVA). The project includes two distinct simulation scenarios and tools for noise spectrum analysis.

---

## Requirements

### Hardware
- **System Memory**: Minimum 10 GB RAM (recommended for large datasets).

### Software
- **MATLAB**: Version 2024a or newer.
- **Simulink**: For running noise spectrum simulations.
- **GNUPLOT**: Version 5.4 or newer (for generating plots).

---

## Getting Started
**download the source code


---

## Usage

Simulation Scenarios

Scenario I: Laser Noise Dominates
Script: Data_process_high_power.m
Description: Simulates high-power conditions where laser source noise is the primary contributor.
How to Run:
>> run('Data_process_high_power.m')

Scenario II: Detection Noise Dominates
Script: Data_process_low_power.m
Description: Simulates low-power conditions where photodiode and op-amp noise dominate.
How to Run:
>> run('Data_process_low_power.m')

Power Spectral Density (PSD) Analysis
Run the Simulink model:
Open Simulation_noise_spectrum.slx in Simulink and execute the simulation.
Process the results:
>> run('Calculate_spectrum.m')

Plotting Results
GNUPLOT Script: main.plt

How to Run:
gnuplot main.plt


---

## Customization
Adjust key parameters in the MATLAB scripts to explore different configurations:
WVA Settings: Post-selection angles, coupling strength.
Laser Parameters: Power levels, coherence properties.
Detector/Op-Amp: Photodiode responsivity, op-amp gain, bandwidth.


---

## Contact
For questions or feedback, contact Jing-Hui Huang at jinghuihuang@cug.edu.cn.